@extends('layouts.base')
@section('title', '退款管理')
@section('content')

<!-- ============================================================== -->
<!-- Container fluid  -->
<!-- ============================================================== -->
<div class="container-fluid">
	<!-- ============================================================== -->
	<!-- Bread crumb and right sidebar toggle -->
	<!-- ============================================================== -->
	<div class="row page-titles">
	    <div class="col-md-5 align-self-center">
	        <h3 class="text-themecolor">退款--列表</h3>
	    </div>
	    <div class="col-md-7 align-self-center">
	        <ol class="breadcrumb">
	            <li class="breadcrumb-item"><a href="javascript:void(0)">首页</a></li>
	            <li class="breadcrumb-item">退款管理</li>
	            <li class="breadcrumb-item active">退款列表</li>
	        </ol>
	    </div>
	</div>
	<!-- ============================================================== -->
	<!-- End Bread crumb and right sidebar toggle -->
	<!-- ============================================================== -->

	<!-- ============================================================== -->
	<!-- Start Page Content -->
	<!-- ============================================================== -->
	<div class="row">
	    <div class="col-12">
	        <div class="card">
	            <div class="card-body">
	                <h4 class="card-title">退款列表</h4>
	                <h6 class="card-subtitle"></h6>
                	<div class="card-body">
                        <form method="get" action="{{ route('admin.refund.index') }}">
                            <div class="form-row">
                                <div class="col-md-3 mb-3">
                                  <label for="validationDefault04">用户名</label>
                                  <input type="text" name="username" class="form-control" id="validationDefault04" placeholder="用户名" value="{{ $username }}" >
                                </div>
                            </div>
                            <button class="btn btn-primary" type="submit">筛选</button>
                            <a href="{{ route('admin.refund.index') }}" class="btn btn-info">重置</a>
                        </form>
                    </div>        
	                <div class="table-responsive">
	                    <table id="demo-foo-addrow" class="table table-bordered m-t-30 table-hover contact-list" data-paging="true" data-paging-size="7">
	                        <thead>
	                            <tr>
	                                <th>ID</th>
	                                <th>用户名</th>
									<th>退货数量</th>
	                                <th>退货单号</th>
									<th>退货原因</th>
	                                <th>退货日期</th>
	                            </tr>
	                        </thead>
	                        <tbody>
	                        	@foreach($refund as $value)
	                            <tr>
	                                <td>{{ $value->id }}</td>
	                                <td>{{ $value->username }}</td>
									<td>{{ $value->return_num }}</td>
	                                <td>{{ $value->return_number }}</td>
									<td>{{ $value->return_content }}</td>
	                                <td>{{ $value->created_at }}</td>
	                            </tr>
	                            @endforeach
	                        </tbody>
	                    </table>
	                    {{ $refund->appends(['username' => $username])->links() }}
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
</div>         
                        
@stop

